<template>
  <div class="app-container">
    <List @handleOpen="handleOpen"></List>
    <!-- <el-tab-pane label="巡检详情" name="2" closable v-if="tabIndex">
        <template v-if="activeName === '2'">
          <CationChildren :rowObj="rowObj"></CationChildren>
        </template>
      </el-tab-pane> -->
  </div>
</template>

<script>
export default {
  name: "advertise",
  // dicts: ['sys_notice_status', 'sys_notice_type'],
  components: {
    List: () => import('./list/index.vue'),//列表
    // CationChildren: () => import('./list/form/cationChildren.vue'),//巡检详情
  },
  data () {
    return {
      activeName: '1',
      tabIndex: false,
      rowObj: undefined,
      timeOut: undefined
    };
  },
  created () {
  },
  // destroyed () {//清除定时器
  //   clearTimeout(this.timeOut)
  // },
  watch: {
  },
  methods: {
    /**
     * 关闭
     */
    removeTab () {
      this.tabIndex = false
      this.activeName = '1'
    },
    clickTab () {
      if (this.activeName === '1') {
        this.tabIndex = false
      }
    },
    /**
     * 打开任务列表详情
     * @param {任务列表参数} row 
     */
    handleOpen (row) {
      this.rowObj = row
      this.tabIndex = true
      this.activeName = '2'
    },
  }
};
</script>
